package com.tianze.tzkf.utils;

import android.net.ConnectivityManager;
import android.net.NetworkInfo;

import static android.content.Context.CONNECTIVITY_SERVICE;
import static com.zkteco.android.biometric.core.utils.ToolUtils.getApplicationContext;

public class CheckWifi {

    public static boolean checkWifi(){
        ConnectivityManager mConnectivityManager = (ConnectivityManager) getApplicationContext().getSystemService(CONNECTIVITY_SERVICE);
        NetworkInfo mNetworkInfo = mConnectivityManager.getActiveNetworkInfo();
        if (mNetworkInfo == null) {
            return false;
        }else {
            return true;
        }
    }

}
